package com.xiguaji.tiktok.task.aweme;

import com.xiguaji.boot.eventbus.EventBusTemplate;
import com.xiguaji.tiktok.task.aweme.event.SaveRecommendAwemeEventListener;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class AwemeTask {
    @Autowired
    EventBusTemplate eventBusTemplate;

    /**
     * 获取推荐流
     *
     * @param param
     * @return
     */
    @XxlJob("awemeHandler")
    public ReturnT<String> awemeHandler(String param) {
        var saveRecommendAwemeEvent = new SaveRecommendAwemeEventListener.SaveRecommendAwemeEvent();
        eventBusTemplate.post(saveRecommendAwemeEvent);
        return ReturnT.SUCCESS;
    }
}


